/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ru.jSkyRoom.matcher.builder.major;

import java.util.Set;
import ru.jSkyRoom.interfaces.major.Armor;
import ru.jSkyRoom.interfaces.major.Enchantment;
import ru.jSkyRoom.interfaces.major.Keyword;
import ru.rakev.matcher.builder.CollectionMatcherBuilder;
import ru.rakev.producer.builder.CollectionProducerBuilder;
import ru.jSkyRoom.producer.builder.major.ArmorProducerBuilder;

/**
 *
 * @author Rakev
 */
public class ArmorMatcherBuilder<F, C extends Armor> extends MajorMatcherBuilder<F, C> {

    public static <T extends Armor> ArmorMatcherBuilder<T, T> create() {
        return new ArmorMatcherBuilder<>(ArmorProducerBuilder.<T>create());
    }

    public ArmorMatcherBuilder(ArmorProducerBuilder<F, C> producerBuilder) {
        super(producerBuilder);
    }

    public CollectionMatcherBuilder<F, Set<Keyword>, Keyword> keywords() {
        return new CollectionMatcherBuilder<F, Set<Keyword>, Keyword>(getProducerBuilder().keywords()) {
        };
    }

    public EnchantmentMatcherBuilder<F, Enchantment> enchantment() {
        return new EnchantmentMatcherBuilder<>(getProducerBuilder().enchantment());
    }

    @Override
    protected ArmorProducerBuilder<F, C> getProducerBuilder() {
        return (ArmorProducerBuilder<F, C>) super.getProducerBuilder();
    }
}
